package com.janj.Phone1Plus;

import java.sql.Connection;
import java.sql.DriverManager;

//自定义的工具类

public class JDBCUtils1 {


        public static Connection getConnection(){
            Connection conn = null;
            try {
                String url = "jdbc:mysql://192.168.65.47:3306/duod9";
                String username = "root";
                String password = "root";
                Class.forName("com.mysql.jdbc.Driver");
                conn = DriverManager.getConnection(url, username, password);
            } catch (Exception e) {
                e.printStackTrace();
            }
            return conn ;
    }
}
